package com.example.mybatisplusapp.controller;



import com.example.mybatisplusapp.dto.AppInfoDto;
import com.example.mybatisplusapp.entity.AppInfo;
import com.example.mybatisplusapp.service.AppInfoService;
import com.example.mybatisplusapp.vo.ResultVo;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/appInfo")
public class AppInfoController {
    @Autowired
    AppInfoService appInfoService;

  /*   @PostMapping("/appInfoPage")
    public ResultVo queryPage(@RequestBody AppInfoDto appInfoDto, @RequestParam(defaultValue = "1") Integer pageNum, HttpServletRequest request) {
        String token = request.getHeader("token");
        String[] split = token.split("-");
        String devId = split[2];       //开发者id
        String userType = split[3];    //userType  类型
        if(userType.equals("dev")){    //如果是开发者就带自己的id去查询
            appInfoDto.setDevid(Integer.parseInt(devId));
        }else if(userType.equals("admin")){
            appInfoDto.setStatus(1);
        }
        // PageInfo<AppInfo> page = appInfoService.page(appInfoDto, pageNum);
        // return ResultVo.success("查询成功", page);
    } */
}
